package com.cardbaobao.cardbabyclient.ui.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ListView;

import com.cardbaobao.cardbabyclient.R;
import com.cardbaobao.cardbabyclient.buried.Google;
import com.cardbaobao.cardbabyclient.buried.Self;
import com.cardbaobao.cardbabyclient.ui.activity.base.BaseActivity;
import com.cardbaobao.cardbabyclient.model.ShowText;
import com.cardbaobao.cardbabyclient.ui.adapter.TextLeftRightAdapter;
import com.cardbaobao.cardbabyclient.buried.GoogleAnalyticsUtil;
import com.cardbaobao.cardbabyclient.widget.TitleBar;

import java.util.ArrayList;

import butterknife.BindView;

/**
 * Created by Jiangzx on 13:53.
 * 学历查询结果
 */
public class AcademicResultActivity extends BaseActivity {
    @BindView(R.id.title_bar)
    TitleBar titleBar;

    @BindView(R.id.list_view)
    ListView listView;
    ArrayList<ShowText> academics;

    @Override
    protected void onResume() {
        super.onResume();
        GoogleAnalyticsUtil.setScreenName(Google.LEARN_QUERY_RESULT);
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        super.initView(savedInstanceState);
        mCurrentPageId= Self.Page.app_chsi_inquiry_success_page;
        titleBar.setLeftViewOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        academics=getIntent().getParcelableArrayListExtra("academics");
        listView.setAdapter(new TextLeftRightAdapter(mContext,academics));
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_academic_result;
    }
}
